package IO;

import java.io.File;
import java.io.FilenameFilter;
import java.util.Arrays;

/**
 * IO 1.0 File类测试
 *
 *
 */
public class FileTest {

    //绝对路径 某个具体文件
    static File file=new File("D:\\Download\\myfile.txt");

    //绝对路径 某个目录
    static File file2=new File("D:/Download");

    //相对路径
    static File file3 = new File("java.txt");


    public static void main(String[] args) {
        System.out.println(Arrays.asList(file2.list()));//String[]->List<T>
        System.out.println(file.canRead());
        System.out.println(file.isDirectory());
        System.out.println(file.getPath());
        System.out.println(file.getAbsolutePath());
    }
}
